package com.ruoyi.weixin.juc2;

import java.text.ParseException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description: TODO
 * @Author ONESTAR
 * @Date: 2021/12/24 15:14
 * @Version 1.0
 */
public class DateTools {
    public static Date parse(String formatpatter, String dateString) throws ParseException {
        return new SimpleDateFormat(formatpatter).parse(dateString);
    }
    public static String format(String formatpatte,Date date){
        return new SimpleDateFormat(formatpatte).format(date).toString();
    }

}
